package com.hospital.dao;

import com.hospital.entity.User;
import com.hospital.entity.UserDepartment;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDepartmentMapper {
    // 修改用户科室方法
    public Integer UpdateDepartment(@Param("userId") Integer userId, @Param("departmentId") Integer departmentId, @Param("deleteState") Integer deleteState);

    //查询用户对应的所有科室
    public List<UserDepartment> SelectDepartment(@Param("id") Integer id, @Param("responsibleDepartmentId") Integer responsibleDepartmentId);

    //添加用户对应的科室
    public Integer InsertDepartment(UserDepartment userDepartment);

    //删除用户对应科室
    public Integer DeleteDepartment(Integer userId);

    //查所有科室
    public List<UserDepartment> SelectAllDepartment();

    //用户姓名与科室查询
    public List<User> SelectByNameDepartment(@Param("name") String name, @Param("department") String department);

}
